<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libslic3r: src/libslic3r/GCodeReader.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Slic3r_192px_transparent.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libslic3r
   </div>
   <div id="projectbrief">Library for generating gcode from 3d models</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f69e6fbaea45487e96bc9ed8ccf9ff8f.html">libslic3r</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">GCodeReader.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_g_code_reader_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef slic3r_GCodeReader_hpp_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define slic3r_GCodeReader_hpp_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="libslic3r_8h.html">libslic3r.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_print_config_8hpp.html">PrintConfig.hpp</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_slic3r.html">Slic3r</a> {</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">class </span><a class="code" href="class_slic3r_1_1_g_code_reader.html">GCodeReader</a>;</div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html">   14</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_slic3r_1_1_g_code_reader.html">GCodeReader</a> {</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    </div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html">   17</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html">GCodeLine</a> {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">public</span>:</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8d751c4aaf9a66d2f244ad092b786c0c">   19</a></span>&#160;        <a class="code" href="class_slic3r_1_1_g_code_reader.html">GCodeReader</a>* <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8d751c4aaf9a66d2f244ad092b786c0c">reader</a>;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8b348ab704ebbc25cd22b00155a881c2">   20</a></span>&#160;        std::string <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8b348ab704ebbc25cd22b00155a881c2">raw</a>;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a0f4ae3de8b2c3da46ab72fe12b9006f8">   21</a></span>&#160;        std::string <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a0f4ae3de8b2c3da46ab72fe12b9006f8">cmd</a>;</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a22e50d8bf5b55e3423c0886d27451557">   22</a></span>&#160;        std::string <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a22e50d8bf5b55e3423c0886d27451557">comment</a>;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a23b6db9fca60a0bd384309b3c50a6fab">   23</a></span>&#160;        std::map&lt;char,std::string&gt; <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a23b6db9fca60a0bd384309b3c50a6fab">args</a>;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        </div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a495aaa567ad807b574debbbde5b89ec6">   25</a></span>&#160;        <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a495aaa567ad807b574debbbde5b89ec6">GCodeLine</a>(<a class="code" href="class_slic3r_1_1_g_code_reader.html">GCodeReader</a>* _reader) : reader(_reader) {};</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        </div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">   27</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="keywordtype">char</span> arg)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;args.count(arg) &gt; 0; };</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#ad274c662f573c493a9e50f7225f582e6">   28</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#ad274c662f573c493a9e50f7225f582e6">get_float</a>(<span class="keywordtype">char</span> arg)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> atof(this-&gt;args.at(arg).c_str()); };</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#acde44e278ee2f424e2207603411a4892">   29</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#acde44e278ee2f424e2207603411a4892">new_X</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;X&#39;</span>) ? atof(this-&gt;args.at(<span class="charliteral">&#39;X&#39;</span>).c_str()) : this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a1ad6d8811c499f0271d6eefb9980eed5">X</a>; };</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af505b9dfc6c8aaf6042e4229dc8c6bbf">   30</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af505b9dfc6c8aaf6042e4229dc8c6bbf">new_Y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;Y&#39;</span>) ? atof(this-&gt;args.at(<span class="charliteral">&#39;Y&#39;</span>).c_str()) : this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a0d5fe2a2f5edcbeb458d3a993961dbf0">Y</a>; };</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a191b0dfb45d053ddd3033674b0de4a2a">   31</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a191b0dfb45d053ddd3033674b0de4a2a">new_Z</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;Z&#39;</span>) ? atof(this-&gt;args.at(<span class="charliteral">&#39;Z&#39;</span>).c_str()) : this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a05cf5dc16c7a0382a4d7b6fbaf6b20af">Z</a>; };</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#adf8ac3cfa97eb414517ec19944c3890f">   32</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#adf8ac3cfa97eb414517ec19944c3890f">new_E</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;E&#39;</span>) ? atof(this-&gt;args.at(<span class="charliteral">&#39;E&#39;</span>).c_str()) : this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a68286ebab9ee26a360b207c110d6844d">E</a>; };</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8661df900abd5199a3d5cde40c33f3bc">   33</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8661df900abd5199a3d5cde40c33f3bc">new_F</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;F&#39;</span>) ? atof(this-&gt;args.at(<span class="charliteral">&#39;F&#39;</span>).c_str()) : this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a3d72dd730b56dbf0558ecf1640fa92b7">F</a>; };</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a98d6d2d0eebe7d7c3e15f4a5fc37e162">   34</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a98d6d2d0eebe7d7c3e15f4a5fc37e162">dist_X</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#acde44e278ee2f424e2207603411a4892">new_X</a>() - this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a1ad6d8811c499f0271d6eefb9980eed5">X</a>; };</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af9f07ca04fc0fa93b9e9f223dd6edc79">   35</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af9f07ca04fc0fa93b9e9f223dd6edc79">dist_Y</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af505b9dfc6c8aaf6042e4229dc8c6bbf">new_Y</a>() - this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a0d5fe2a2f5edcbeb458d3a993961dbf0">Y</a>; };</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af6d1f0d7a22bf84ac8990794a75d4971">   36</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af6d1f0d7a22bf84ac8990794a75d4971">dist_Z</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a191b0dfb45d053ddd3033674b0de4a2a">new_Z</a>() - this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a05cf5dc16c7a0382a4d7b6fbaf6b20af">Z</a>; };</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af2e6b228ccc023ed5340659fc1012e98">   37</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af2e6b228ccc023ed5340659fc1012e98">dist_E</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#adf8ac3cfa97eb414517ec19944c3890f">new_E</a>() - this-&gt;reader-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader.html#a68286ebab9ee26a360b207c110d6844d">E</a>; };</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a45713a9bb98212ca089017c98c95ede9">   38</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a45713a9bb98212ca089017c98c95ede9">dist_XY</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            <span class="keywordtype">float</span> x = this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a98d6d2d0eebe7d7c3e15f4a5fc37e162">dist_X</a>();</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            <span class="keywordtype">float</span> y = this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af9f07ca04fc0fa93b9e9f223dd6edc79">dist_Y</a>();</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            <span class="keywordflow">return</span> sqrt(x*x + y*y);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        };</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a3cda1679f362c547f4b0b4d59dad343c">   43</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a3cda1679f362c547f4b0b4d59dad343c">extruding</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;cmd == <span class="stringliteral">&quot;G1&quot;</span> &amp;&amp; this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af2e6b228ccc023ed5340659fc1012e98">dist_E</a>() &gt; 0; };</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af0647dadc3aab5e06ee12565fc421d6c">   44</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af0647dadc3aab5e06ee12565fc421d6c">retracting</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;cmd == <span class="stringliteral">&quot;G1&quot;</span> &amp;&amp; this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af2e6b228ccc023ed5340659fc1012e98">dist_E</a>() &lt; 0; };</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af66d1d7e2d8848a2bd731ceee4ab6fbd">   45</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af66d1d7e2d8848a2bd731ceee4ab6fbd">travel</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;cmd == <span class="stringliteral">&quot;G1&quot;</span> &amp;&amp; !this-&gt;<a class="code" href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">has</a>(<span class="charliteral">&#39;E&#39;</span>); };</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordtype">void</span> <span class="keyword">set</span>(<span class="keywordtype">char</span> arg, std::string value);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    };</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html#af3168d70f8de2b7af6714d1ee14f2740">   48</a></span>&#160;    <span class="keyword">typedef</span> std::function&lt;void(GCodeReader&amp;, const GCodeLine&amp;)&gt; <a class="code" href="class_slic3r_1_1_g_code_reader.html#af3168d70f8de2b7af6714d1ee14f2740">callback_t</a>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html#a05cf5dc16c7a0382a4d7b6fbaf6b20af">   50</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#a1ad6d8811c499f0271d6eefb9980eed5">X</a>, <a class="code" href="class_slic3r_1_1_g_code_reader.html#a0d5fe2a2f5edcbeb458d3a993961dbf0">Y</a>, <a class="code" href="class_slic3r_1_1_g_code_reader.html#a05cf5dc16c7a0382a4d7b6fbaf6b20af">Z</a>, <a class="code" href="class_slic3r_1_1_g_code_reader.html#a68286ebab9ee26a360b207c110d6844d">E</a>, <a class="code" href="class_slic3r_1_1_g_code_reader.html#a3d72dd730b56dbf0558ecf1640fa92b7">F</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html#ad7c99f91d2d731b5ecd148b2c187ea94">   51</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#ad7c99f91d2d731b5ecd148b2c187ea94">verbose</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html#a4e9fc8bc326d807cb2981dbca3cd1b63">   52</a></span>&#160;    callback_t <a class="code" href="class_slic3r_1_1_g_code_reader.html#a4e9fc8bc326d807cb2981dbca3cd1b63">callback</a>; </div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    </div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="class_slic3r_1_1_g_code_reader.html#ab29dab3cb9db43a5593eb74a5c3dce1e">   54</a></span>&#160;    <a class="code" href="class_slic3r_1_1_g_code_reader.html#ab29dab3cb9db43a5593eb74a5c3dce1e">GCodeReader</a>() : X(0), Y(0), Z(0), E(0), F(0), verbose(false), _extrusion_axis(<span class="stringliteral">&#39;E&#39;</span>) {};</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#a28f914bed7efac122e23b33cb477a411">apply_config</a>(<span class="keyword">const</span> <a class="code" href="class_slic3r_1_1_print_config_base.html">PrintConfigBase</a> &amp;config);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#a7b8d5cda521cdd7ea977b355da6c3052">parse</a>(<span class="keyword">const</span> std::string &amp;gcode, callback_t callback);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#af63800283e44fd23bfecffaf640a15d5">parse_line</a>(std::string line, callback_t callback);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_slic3r_1_1_g_code_reader.html#ae846dd8e8494250bdaf23f6a46ac53c7">parse_file</a>(<span class="keyword">const</span> std::string &amp;file, callback_t callback);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="class_slic3r_1_1_g_code_config.html">GCodeConfig</a> _config;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordtype">char</span> _extrusion_axis;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;} <span class="comment">/* namespace Slic3r */</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* slic3r_GCodeReader_hpp_ */</span><span class="preprocessor"></span></div><div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a0f4ae3de8b2c3da46ab72fe12b9006f8"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a0f4ae3de8b2c3da46ab72fe12b9006f8">Slic3r::GCodeReader::GCodeLine::cmd</a></div><div class="ttdeci">std::string cmd</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:21</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a0d5fe2a2f5edcbeb458d3a993961dbf0"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a0d5fe2a2f5edcbeb458d3a993961dbf0">Slic3r::GCodeReader::Y</a></div><div class="ttdeci">float Y</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:50</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_config_html"><div class="ttname"><a href="class_slic3r_1_1_g_code_config.html">Slic3r::GCodeConfig</a></div><div class="ttdef"><b>Definition:</b> PrintConfig.hpp:315</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html">Slic3r::GCodeReader</a></div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:14</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af9f07ca04fc0fa93b9e9f223dd6edc79"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af9f07ca04fc0fa93b9e9f223dd6edc79">Slic3r::GCodeReader::GCodeLine::dist_Y</a></div><div class="ttdeci">float dist_Y() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:35</div></div>
<div class="ttc" id="libslic3r_8h_html"><div class="ttname"><a href="libslic3r_8h.html">libslic3r.h</a></div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a28f914bed7efac122e23b33cb477a411"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a28f914bed7efac122e23b33cb477a411">Slic3r::GCodeReader::apply_config</a></div><div class="ttdeci">void apply_config(const PrintConfigBase &amp;config)</div><div class="ttdef"><b>Definition:</b> GCodeReader.cpp:10</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a1ad6d8811c499f0271d6eefb9980eed5"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a1ad6d8811c499f0271d6eefb9980eed5">Slic3r::GCodeReader::X</a></div><div class="ttdeci">float X</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:50</div></div>
<div class="ttc" id="_print_config_8hpp_html"><div class="ttname"><a href="_print_config_8hpp.html">PrintConfig.hpp</a></div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a8d751c4aaf9a66d2f244ad092b786c0c"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8d751c4aaf9a66d2f244ad092b786c0c">Slic3r::GCodeReader::GCodeLine::reader</a></div><div class="ttdeci">GCodeReader * reader</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:19</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af66d1d7e2d8848a2bd731ceee4ab6fbd"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af66d1d7e2d8848a2bd731ceee4ab6fbd">Slic3r::GCodeReader::GCodeLine::travel</a></div><div class="ttdeci">bool travel() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:45</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_ab29dab3cb9db43a5593eb74a5c3dce1e"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#ab29dab3cb9db43a5593eb74a5c3dce1e">Slic3r::GCodeReader::GCodeReader</a></div><div class="ttdeci">GCodeReader()</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:54</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a2d113f50a0146607f17d89d5e6db3685"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a2d113f50a0146607f17d89d5e6db3685">Slic3r::GCodeReader::GCodeLine::has</a></div><div class="ttdeci">bool has(char arg) const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:27</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_ad274c662f573c493a9e50f7225f582e6"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#ad274c662f573c493a9e50f7225f582e6">Slic3r::GCodeReader::GCodeLine::get_float</a></div><div class="ttdeci">float get_float(char arg) const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:28</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_acde44e278ee2f424e2207603411a4892"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#acde44e278ee2f424e2207603411a4892">Slic3r::GCodeReader::GCodeLine::new_X</a></div><div class="ttdeci">float new_X() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:29</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_ae846dd8e8494250bdaf23f6a46ac53c7"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#ae846dd8e8494250bdaf23f6a46ac53c7">Slic3r::GCodeReader::parse_file</a></div><div class="ttdeci">void parse_file(const std::string &amp;file, callback_t callback)</div><div class="ttdef"><b>Definition:</b> GCodeReader.cpp:82</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a495aaa567ad807b574debbbde5b89ec6"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a495aaa567ad807b574debbbde5b89ec6">Slic3r::GCodeReader::GCodeLine::GCodeLine</a></div><div class="ttdeci">GCodeLine(GCodeReader *_reader)</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:25</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_ad7c99f91d2d731b5ecd148b2c187ea94"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#ad7c99f91d2d731b5ecd148b2c187ea94">Slic3r::GCodeReader::verbose</a></div><div class="ttdeci">bool verbose</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:51</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af505b9dfc6c8aaf6042e4229dc8c6bbf"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af505b9dfc6c8aaf6042e4229dc8c6bbf">Slic3r::GCodeReader::GCodeLine::new_Y</a></div><div class="ttdeci">float new_Y() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:30</div></div>
<div class="ttc" id="class_slic3r_1_1_print_config_base_html"><div class="ttname"><a href="class_slic3r_1_1_print_config_base.html">Slic3r::PrintConfigBase</a></div><div class="ttdef"><b>Definition:</b> PrintConfig.hpp:121</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a05cf5dc16c7a0382a4d7b6fbaf6b20af"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a05cf5dc16c7a0382a4d7b6fbaf6b20af">Slic3r::GCodeReader::Z</a></div><div class="ttdeci">float Z</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:50</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a7b8d5cda521cdd7ea977b355da6c3052"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a7b8d5cda521cdd7ea977b355da6c3052">Slic3r::GCodeReader::parse</a></div><div class="ttdeci">void parse(const std::string &amp;gcode, callback_t callback)</div><div class="ttdef"><b>Definition:</b> GCodeReader.cpp:17</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a22e50d8bf5b55e3423c0886d27451557"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a22e50d8bf5b55e3423c0886d27451557">Slic3r::GCodeReader::GCodeLine::comment</a></div><div class="ttdeci">std::string comment</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:22</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af6d1f0d7a22bf84ac8990794a75d4971"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af6d1f0d7a22bf84ac8990794a75d4971">Slic3r::GCodeReader::GCodeLine::dist_Z</a></div><div class="ttdeci">float dist_Z() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:36</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af2e6b228ccc023ed5340659fc1012e98"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af2e6b228ccc023ed5340659fc1012e98">Slic3r::GCodeReader::GCodeLine::dist_E</a></div><div class="ttdeci">float dist_E() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:37</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a68286ebab9ee26a360b207c110d6844d"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a68286ebab9ee26a360b207c110d6844d">Slic3r::GCodeReader::E</a></div><div class="ttdeci">float E</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:50</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_af0647dadc3aab5e06ee12565fc421d6c"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#af0647dadc3aab5e06ee12565fc421d6c">Slic3r::GCodeReader::GCodeLine::retracting</a></div><div class="ttdeci">bool retracting() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:44</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a3cda1679f362c547f4b0b4d59dad343c"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a3cda1679f362c547f4b0b4d59dad343c">Slic3r::GCodeReader::GCodeLine::extruding</a></div><div class="ttdeci">bool extruding() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:43</div></div>
<div class="ttc" id="namespace_slic3r_html"><div class="ttname"><a href="namespace_slic3r.html">Slic3r</a></div><div class="ttdef"><b>Definition:</b> BoundingBox.cpp:4</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a23b6db9fca60a0bd384309b3c50a6fab"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a23b6db9fca60a0bd384309b3c50a6fab">Slic3r::GCodeReader::GCodeLine::args</a></div><div class="ttdeci">std::map&lt; char, std::string &gt; args</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:23</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a8b348ab704ebbc25cd22b00155a881c2"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8b348ab704ebbc25cd22b00155a881c2">Slic3r::GCodeReader::GCodeLine::raw</a></div><div class="ttdeci">std::string raw</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:20</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a3d72dd730b56dbf0558ecf1640fa92b7"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a3d72dd730b56dbf0558ecf1640fa92b7">Slic3r::GCodeReader::F</a></div><div class="ttdeci">float F</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:50</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a45713a9bb98212ca089017c98c95ede9"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a45713a9bb98212ca089017c98c95ede9">Slic3r::GCodeReader::GCodeLine::dist_XY</a></div><div class="ttdeci">float dist_XY() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:38</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_a4e9fc8bc326d807cb2981dbca3cd1b63"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#a4e9fc8bc326d807cb2981dbca3cd1b63">Slic3r::GCodeReader::callback</a></div><div class="ttdeci">callback_t callback</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:52</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a191b0dfb45d053ddd3033674b0de4a2a"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a191b0dfb45d053ddd3033674b0de4a2a">Slic3r::GCodeReader::GCodeLine::new_Z</a></div><div class="ttdeci">float new_Z() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:31</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html">Slic3r::GCodeReader::GCodeLine</a></div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:17</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_af3168d70f8de2b7af6714d1ee14f2740"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#af3168d70f8de2b7af6714d1ee14f2740">Slic3r::GCodeReader::callback_t</a></div><div class="ttdeci">std::function&lt; void(GCodeReader &amp;, const GCodeLine &amp;)&gt; callback_t</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:48</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a98d6d2d0eebe7d7c3e15f4a5fc37e162"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a98d6d2d0eebe7d7c3e15f4a5fc37e162">Slic3r::GCodeReader::GCodeLine::dist_X</a></div><div class="ttdeci">float dist_X() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:34</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_a8661df900abd5199a3d5cde40c33f3bc"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#a8661df900abd5199a3d5cde40c33f3bc">Slic3r::GCodeReader::GCodeLine::new_F</a></div><div class="ttdeci">float new_F() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:33</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_1_1_g_code_line_html_adf8ac3cfa97eb414517ec19944c3890f"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader_1_1_g_code_line.html#adf8ac3cfa97eb414517ec19944c3890f">Slic3r::GCodeReader::GCodeLine::new_E</a></div><div class="ttdeci">float new_E() const</div><div class="ttdef"><b>Definition:</b> GCodeReader.hpp:32</div></div>
<div class="ttc" id="class_slic3r_1_1_g_code_reader_html_af63800283e44fd23bfecffaf640a15d5"><div class="ttname"><a href="class_slic3r_1_1_g_code_reader.html#af63800283e44fd23bfecffaf640a15d5">Slic3r::GCodeReader::parse_line</a></div><div class="ttdeci">void parse_line(std::string line, callback_t callback)</div><div class="ttdef"><b>Definition:</b> GCodeReader.cpp:26</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
